<template>
  <div class="menu-list">
    <el-row class="tac">
      <el-col :span="24">
        <el-menu background-color="#00b16a" text-color="#fff" active-text-color="#fff" :default-active="activeIndex" class="el-menu-vertical-demo" :unique-opened="true" :router="true">
          <!-- <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-s-home"></i>
              <span>首页</span>
            </template>
            <el-menu-item>房源排名</el-menu-item>
            <el-menu-item>数据统计</el-menu-item>
          </el-submenu> -->

          <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-menu"></i>
              <span>房源管理</span>
            </template>
            <el-menu-item index="1-1" :route="{name: 'B_HouseList'}">房源列表</el-menu-item>
            <el-menu-item index="1-2" :route="{name: 'B_PostHouse'}">发布房源</el-menu-item>
            <el-menu-item index="1-3" :route="{name: 'B_CheckHouse'}">审核房源</el-menu-item>
            <el-menu-item index="1-4" :route="{name: 'B_Estate'}">小区列表</el-menu-item>
          </el-submenu>

          <el-submenu index="2" v-if="$cookies.get('__ac') == 1">
            <template slot="title">
              <i class="el-icon-user-solid"></i>
              <span>角色管理</span>
            </template>
            <el-menu-item index="2-1" :route="{name: 'userList'}">用户列表</el-menu-item>
            <el-menu-item index="2-2" :route="{name: 'agentList'}">经纪人列表</el-menu-item>
          </el-submenu>

          <el-submenu index="3" v-if="$cookies.get('__ac') == 1">
            <template slot="title">
              <i class="el-icon-s-help"></i>
              <span>权限管理</span>
            </template>
            <el-menu-item index="3-1" :route="{name: 'adminList'}">权限配置</el-menu-item>
          </el-submenu>

        </el-menu>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import '@/assets/less/b_menulist.less'
export default {
  name: 'MenuList',
  props: ['activeIndex'],
  data() {
    return {};
  }
}
</script>